<?php if (!defined('BASEPATH')) exit('No direct script access allowed'); ?>
<?php 
	$ci = & get_instance(); 
	$cat_id = intval($_POST['cat_id']);
	$CAT = $ci->category_manual_entity->init('id', $cat_id);
	$match_id = $CAT->getMatchId();
	$manual_category_type = getManualCategoryConfig();
?>

<form action="<?php echo site_url('admin/dataman/manual_event/edit_category_submit');?>" name="edit_category_submit" id="edit_category_submit" method="post" enctype="multipart/form-data" >
	<input type="hidden" name="match_id" id="match_id" value="<?php echo $match_id;?>" />
	<input type="hidden" name="cat_id" id="cat_id" value="<?php echo $cat_id;?>" />
	
	<div class="clrboth"></div>
	<div class="grid2"><span class="bold">*Category name:</span></div>
	<div class="grid6"><input type="text" maxlength="255" id="category" name="category" value="<?php echo $CAT->getCategoryName();?>" class="std-input"/></div>
	<div class="grid2"><span class="bold red hidden" id="category_error">Required field.</span></div>
	<div class="clrboth"></div>
	
	<div class="clrboth"></div>
	<div class="grid2"><span class="bold">*Odds:</span></div>
	<div class="grid6"><input type="text" maxlength="10" id="odds" name="odds" value="<?php echo $CAT->getOdds();?>" class="std-input"/></div>
	<div class="grid2"><span class="bold red hidden" id="odds_error">Required field.</span></div>
	<div class="clrboth"></div>
	
	<?php if($CAT->getType() == 'box'):?>
		<div id="box_div">
			<div class="grid2"><span class="bold">*Number of Boxes:</span></div>
			<div class="grid6"><input type="text" maxlength="5" id="number_boxes" name="number_boxes" value="<?php echo $CAT->getNumberBoxes();?>" class="std-input"/></div>
			<div class="grid2"><span class="bold red hidden" id="number_boxes_error">Required field.</span></div>
		</div>
	<?php endif;?>
	<div class="clrboth"></div>
	<?php if($CAT->getType() == 'range'):?>
		<div id="range_div">
			<div class="grid2"><span class="bold">*Range Denote:</span></div>
			<div class="grid6"><input type="text" maxlength="5" id="range_denote" name="range_denote" value="<?php echo $CAT->getRangeDenote();?>" class="std-input"/></div>
			<div class="grid2"><span class="bold red hidden" id="range_denote_error">Required field.</span></div>
		</div>
	<?php endif;?>
	<div class="clrboth"></div>
	
	<div class="clrboth"></div>
	<div class="grid2"><span class="bold">Ordering:</span></div>
	<div class="grid6"><input type="text" maxlength="5" id="ordering" name="ordering" value="<?php echo $CAT->getOrdering();?>" class="std-input"/></div>
	<div class="grid2"><span class="bold red hidden" id="ordering_error">Required field.</span></div>
	<div class="clrboth"></div>
	
	<div class="grid2">&nbsp;</div>
	<div class="grid6"><input type="submit" class="button" /> <?php echo loader_image('id="loader_image" class="hidden"');?></div>
	<div class="clrboth"></div>	
	
</form>
